package com.nbcio.iot.domain.bo;

import com.nbcio.common.core.validate.AddGroup;
import com.nbcio.common.core.validate.EditGroup;
import com.nbcio.iot.domain.entity.IotDeviceGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Null;

/**
 * 设备分组业务对象 iot_device_group
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = IotDeviceGroup.class, reverseConvertGenerate = true)
public class IotDeviceGroupBo extends IotDeviceGroup {

    @Null(message = "分组ID必须为空", groups = { AddGroup.class })
    private Long groupId;

    @NotBlank(message = "分组名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String groupName;

    private Long parentId;
} 